/*
@author: feng
@date: 2022/6/26 18:59
@Version: 1.0
@last modifined by : 2022/6/26 18:59
@last Modifined time : 2022/6/26 18:59
*/

import { createSlice } from '@reduxjs/toolkit';

const theme = createSlice({
  name: 'theme',
  initialState: {
    collapsed: true,
  },
  reducers: {
    getSidebarExpandedState(state, { payload }) {
      state.collapsed = payload.collapsed;
    },
  },
});

// 导出方法
export const { getSidebarExpandedState } = theme.actions;

// 默认导出
export default theme.reducer;
